//
//  YPCoreBaseTable_v.swift
//  
//
//  Created by ogawa on 2020/5/26.
//  Copyright © 2020 ogawa. All rights reserved.
//

import UIKit

class YPCoreBaseTable_v: UITableView {

      init () {
          super.init(frame: CGRect(), style: .grouped)
      }

      override init(frame: CGRect, style: UITableView.Style) {
          super.init(frame: frame, style: style)
          makeUI()
      }

      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          makeUI()
      }

    func makeUI() {
        rowHeight = UITableView.automaticDimension
        estimatedRowHeight = 50
        sectionHeaderHeight = 40
        backgroundColor = .clear
        cellLayoutMarginsFollowReadableWidth = false
        keyboardDismissMode = .onDrag
        separatorColor  = .clear
        separatorInset  = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
        tableHeaderView = YPCoreView(height: 1)
        tableFooterView = UIView()
    }
    
}
